package com.example.bookstore.validate

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.validator.constraints.Range

/**
 * Created by IntelliJ IDEA.
 * User: lvshe
 * Date: 2019/8/10
 * Time: 13:52
 */
@ApiModel("分页查询")
class PageNSizeValidate {

    @ApiModelProperty("页数 (0-2147483647）", name = "page", allowableValues = "range(0, 10)", required = false)
    @Range(min = 0L, max = Int.MAX_VALUE.toLong())
    var page: Int = 0

    @ApiModelProperty("每页显示个数 （0-1000）", name = "size", allowableValues = "range(0, 10)", required = false)
    @Range(min = 0L, max = 1000)
    var size: Int = 100
}